// common/ad/ad.js
const app = getApp();
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    ishome: {
      type: Boolean,
      value: true
    }
  },

  /**
   * 组件的方法列表
   */
  methods: {
    
    tabNav(e){
      
      let num=e.currentTarget.dataset.num;
      let ishome=this.properties.ishome
      if(ishome && num==2){
        wx.navigateTo({
          url: '/pages/hole/hole_index/hole_index'
        });
      }
      if(!ishome && num==1){
        wx.navigateBack();
      }
      
    }
  }
})
